{% extends "control/base.html" %}
{% load i18n %}

{% block content %}

<p>
    <a href="{% url "control:bbbserver.create" %}" class="btn">
    {% trans "Add new server" %}
    </a>
</p>
<table>
    <thead>
    <tr>
        <th>{% trans "ID" %}</th>
        <th>{% trans "URL" %}</th>
        <th>{% trans "World" %}</th>
        <th class="text-right">{% trans "Current cost" %}</th>
        <th></th>
        <th></th>
    </tr>
    </thead>
    <tbody>
    {% for s in servers %}
    <tr class="{% if not s.active %}deleted{% endif %}">
        <td>
            <b>{{ s.pk }}</b>
        </td>
        <td>
            {{ s.url }}
        </td>
        <td>
            {% if s.world_exclusive %}
                {{ s.world_exclusive }}
            {% else %}
                {% trans "All" %}
            {% endif %}
            {% if s.rooms_only %}
                (rooms only)
            {% endif %}
        </td>
        <td class="text-right">
            {{ s.cost }}
        </td>
        <td class="text-right">
            <a href="{% url 'control:bbbserver.delete' pk=s.pk %}">
                {% trans "Delete" %}
            </a>
        </td>
        <td class="text-right">
            <a href="{% url 'control:bbbserver.update' pk=s.pk %}">
                {% trans "Edit" %}
            </a>
        </td>
    </tr>
    {% endfor %}
    </tbody>
</table>
{% endblock %}
